//
//  ICNewEditionManager.m
//  ICome
//
//  Created by zhangrongwu on 2017/4/19.
//  Copyright © 2017年 iCom. All rights reserved.
//

#import "ICNewEditionManager.h"
#import "ICLoginNetworkManager.h"

@implementation ICNewEditionManager

+(instancetype)shareManager {
    static ICNewEditionManager *instance;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        instance = [[ICNewEditionManager alloc] init];
    });
    return instance;
}



#pragma mark - 立即升级
- (void)openURL:(NSString *)url {
    NSURL *URL = [NSURL URLWithString:[url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
    [[UIApplication sharedApplication] openURL:URL];
}


#pragma mark - 忽略新版本
- (void)ignoreNewVersion:(NSString *)version {
    //保存忽略的版本号
    [[NSUserDefaults standardUserDefaults] setObject:version forKey:@"ingoreVersion"];
    [[NSUserDefaults standardUserDefaults] synchronize];
}

@end
